//
//  GoOutPlanTableViewCell.m
//  MobileOffice
//
//  Created by jjkj on 16/11/14.
//  Copyright © 2016年 liaoningjujin. All rights reserved.
//

#import "GoOutPlanTableViewCell.h"

@implementation GoOutPlanTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self=[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        _startTitle=[MyControl creatLabelWithFrame:CGRectMake(10, 10, 80, 30) text:@"出        发："];
        _startTitle.textColor=[UIColor grayColor];
        _startTitle.layer.masksToBounds=YES;
        _startTitle.layer.cornerRadius=5;
        [self.contentView addSubview:_startTitle];
        
        _startMessage=[MyControl creatLabelWithFrame:CGRectMake(_startTitle.x+_startTitle.width, 5, IPHONE_WIDTH/2-(_startTitle.x+_startTitle.width)-10, 40) text:@""];
        _startMessage.numberOfLines=0;
        _startMessage.textColor=[UIColor blackColor];
        [self.contentView addSubview:_startMessage];
        
        _endTitle=[MyControl creatLabelWithFrame:CGRectMake(IPHONE_WIDTH/2+10, 10, 80, 30) text:@"目        的："];
        _endTitle.textColor=[UIColor grayColor];
        _endTitle.layer.masksToBounds=YES;
        _endTitle.layer.cornerRadius=5;
        [self.contentView addSubview:_endTitle];
        
        _endMessage=[MyControl creatLabelWithFrame:CGRectMake(_endTitle.x+_endTitle.width, _startMessage.y, _startMessage.width, 40) text:@""];
        _endMessage.numberOfLines=0;
        _endMessage.textColor=[UIColor blackColor];
        [self.contentView addSubview:_endMessage];
        
        _meansTitle=[MyControl creatLabelWithFrame:CGRectMake(10, 45, 80, 30) text:@"出行方式："];
        _meansTitle.textColor=[UIColor grayColor];
        _meansTitle.layer.masksToBounds=YES;
        _meansTitle.layer.cornerRadius=5;
        [self.contentView addSubview:_meansTitle];
        
        _meansMessage=[MyControl creatLabelWithFrame:CGRectMake(_startMessage.x, 40, _startMessage.width, 40) text:@""];
        _meansMessage.numberOfLines=0;
        _meansMessage.textColor=[UIColor blackColor];
       // _meansMessage.backgroundColor=[UIColor greenColor];
        [self.contentView addSubview:_meansMessage];
        
        _spendTitle=[MyControl creatLabelWithFrame:CGRectMake(_endTitle.x, _meansTitle.y, 80, 30) text:@"费用预计："];
        _spendTitle.textColor=[UIColor grayColor];
        _spendTitle.layer.masksToBounds=YES;
        _spendTitle.layer.cornerRadius=5;

        _spendMessage=[MyControl creatLabelWithFrame:CGRectMake(_endMessage.x, _meansMessage.y, _startMessage.width, 40) text:@""];
        _spendMessage.numberOfLines=0;
        //_spendMessage.backgroundColor=[UIColor redColor];
        _spendMessage.textColor=[UIColor blackColor];
        [self.contentView addSubview:_spendMessage];
        [self.contentView addSubview:_spendTitle];

        
        //添加分割线
        UILabel *line=[[UILabel alloc]initWithFrame:CGRectMake(0, 89, IPHONE_WIDTH, 1)];
        line.backgroundColor=BACKCOLOR_GRAY;
        [self.contentView addSubview:line];
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
